package com.yanqu.road.web.util;

import com.yanqu.road.utils.net.ServerNetConfig;
import com.yanqu.road.utils.net.ServerNetConfigHelper;
import com.yanqu.road.utils.ServerType;

public class AllocateAddress {
	public static ServerNetConfig allocate(long userId) {
		int index = (int) (userId % ServerNetConfigHelper.getAgentCount());
		ServerNetConfig netConfig = ServerNetConfigHelper.getServerNetConfig(ServerType.SERVER_AGENT, index);
		return netConfig;
	}
}
